<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Why not using hierarchy of loggers, like in log4j? Why not Boost.Log4j? Etc.</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../rationale.html" title="Rationale and FAQ">
<link rel="prev" href="why_not_lazy_streaming.html" title="Why not using lazy streaming?">
<link rel="next" href="fork_support.html" title="Does Boost.Log support process forking?">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="why_not_lazy_streaming.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rationale.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fork_support.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="log.rationale.why_not_log4j"></a><a class="link" href="why_not_log4j.html" title="Why not using hierarchy of loggers, like in log4j? Why not Boost.Log4j? Etc.">Why not using hierarchy
      of loggers, like in log4j? Why not Boost.Log4j? Etc.</a>
</h3></div></div></div>
<p>
        There are enough <a href="http://logging.apache.org/log4j/" target="_top">log4j</a>-like
        libraries available for C++ already (see <a href="http://logging.apache.org/log4cxx/" target="_top">here</a>,
        <a href="http://log4cplus.sourceforge.net/" target="_top">here</a> and <a href="http://log4cpp.sourceforge.net/" target="_top">here</a>),
        so there is no point in implementing yet another one. Instead, this library
        was aimed to solve more complex tasks, including ones that do not directly
        fall under the common definition of "logging" term as a debugging
        tool. Additionally, as Boost.Log was to be a generic library, it had to provide
        more ways of extending itself, while keeping performance as high as possible.
        Log4j concept seemed too limiting and inappropriate for these tasks and therefore
        was rejected.
      </p>
<p>
        As for hierarchical loggers, there is no need for this feature in the current
        library design. One of the main benefits it provides in log4j is determining
        the appenders (sinks, in terms of this library) in which a log record will
        end up. This library achieves the same result by filtering. The other application
        of this feature in Boost.Log could be that the loggers in the hierarchy could
        combine their sets of attributes for each log record, but there was no demand
        in real world applications for such a feature. It can be added though, if
        it proves useful.
      </p>
</div>
<div class="copyright-footer">Copyright © 2007-2024 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="why_not_lazy_streaming.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rationale.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fork_support.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
